﻿using System;
using System.Web.UI;
using WEATHER.Components;

namespace WEATHER.Modules.ONLINE.Pages
{
    public partial class NotificationWeather : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {
                Guid mid = new Guid(Request.QueryString["mid"]);

                rptItems1.DataSource = Item.SelectTopBy_WeatherType(mid, DangerousWeatherType.TTNH_BaoVaApThapNhietDoi.ToString(), 1);
                rptItems1.DataBind();

                rptItems2.DataSource = Item.SelectTopBy_WeatherType(new Guid("459ba8fc-853d-45a3-b3f7-2dd29661edbb"), DangerousWeatherType.TTNH_KhongKhiLanh.ToString(), 1);
                rptItems2.DataBind();

                rptItems3.DataSource = Item.SelectTopBy_WeatherType(new Guid("5fc9175b-4f5a-406b-9391-3a7e204c425e"), DangerousWeatherType.TTNH_KhoHan.ToString(), 1);
                rptItems3.DataBind();

                rptItems4.DataSource = Item.SelectTopBy_WeatherType(new Guid("dd524497-16ff-43dd-9d50-29d5e748da56"), DangerousWeatherType.TVDB_ThongBaoLu.ToString(), 1);
                rptItems4.DataBind();

                rptItems5.DataSource = Item.SelectTopBy_WeatherType(new Guid("c132e759-b1a1-4c68-8f2a-48501e585101"), DangerousWeatherType.TVDB_ThongBaoCan.ToString(), 1);
                rptItems5.DataBind();
            }
        }
    }
}
